//
//  NovelSecondTableViewCell.m
//  A_Program
//
//  Created by dlios on 15-5-21.
//  Copyright (c) 2015年 BayMax. All rights reserved.
//

#import "NovelSecondCollectionViewCell.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "NovelSecondModel.h"
@implementation NovelSecondCollectionViewCell
- (void)dealloc
{
    [self.secondMyImageView release];
    [self.secondMyLable release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {

        //设置白色
        [self setBackgroundColor:[UIColor whiteColor]];
        self.secondMyImageView = [[[UIImageView alloc]initWithFrame:CGRectMake(5,5, self.frame.size.width - 10, self.frame.size.height* 3 / 4)]autorelease];
        [self.contentView addSubview:self.secondMyImageView];
        [self.secondMyImageView setBackgroundColor:[UIColor orangeColor]];
        
        self.secondMyLable = [[UILabel alloc]initWithFrame:CGRectMake(5, self.frame.size.height* 3 / 4 + 5, self.frame.size.width - 10, self.frame.size.height / 4 - 5)];
        self.secondMyLable.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:self.secondMyLable];
        [self.secondMyLable release];
    }
    return self;

}

- (void)createContentImageView:(NovelSecondModel *)secondModel{
    [self.secondMyImageView sd_setImageWithURL:[NSURL URLWithString:secondModel.cover_path] placeholderImage:[UIImage imageNamed:@"1.jpg"]];
    [self.secondMyLable setText:secondModel.tname];
}
- (void)awakeFromNib {
    // Initialization code
}



@end
